#include <iostream>
#include <string>
#include <algorithm>
#include <cctype>
using namespace std;
int a[] = {1,2,3,1,2,3,1,2,3,1,2,3,1,2,3,1,2,3,4,1,2,3,1,2,3,4};

int main()
{
   string s;
   getline(cin,s);
   int cnt = 0;
   for(auto e : s)
   {
   	if(isspace(e))
   	cnt++;
   	else
   	cnt += a[e-'a'];
   }
   cout << cnt << endl;
}
